home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
batch
/
yet101.zip
/
YET10.DOC
< prev
Wrap
Text File
|
1992-03-19
|
3KB
|
77 lines
YET 1.0
Is it time YET?
This utility was designed for use in batch files to determine if a
specified time or date has been reached. This could be useful in
recommending backups, or file cleanups. Other uses are left to your
imagination. YET communicates with your batch file through the command
line and the exit code. The exit code can be used to branch in your batch
file.
Parameters:
Date: A date on or after which YET will return "True" (exit code 0).
If a time is specified, it must be after that time also. Format is
MM/DD/YYYY, in numbers or MONTH/DD/YYYY or DD/MONTH/YYYY using 3 or
more letters in the month name. Years may be abbreviated to 2
numbers, or omitted for current year. Some format checking to ensure
that months greater than 12, or days greater than 31 is performed to
aid the user.
Day: An alternative to specifying the date, is specifying the day of
the week. At least 3 letters must be used. YET will return "True"
(exit code 0) only ON that day. There is no "after" a day of the
week. If a time is specified it must be after that time also.
Time: Time of Day in 24 hour notation, HH:MM:SS. Only Hours are
mandatory, but they must be followed by a colon.
PAUSE: A "switch." If pause is specified on the command line, the
program will wait 5 seconds before continuing in your batch file, so
that you may read its output. Do not put slashes or dashes in front
of these switches!
QUIET: Another "switch." Once you are assured that your batch file
correctly branches with YET, all non-error text output of YET is
suppressed. Each switch may be abbreviated to a single letter.
Errors:
If YET does not understand one of the command line parameters, it will
declare the error, display a help screen and pause for 5 seconds. It will
then return an exit code of 1.
Exit Codes:
In a batch file, the exit code may be tested after a program is run. The
ERRORLEVEL construct of the IF command is used to branch on the exit code
results. When testing ERRORLEVELs you must work from highest to lowest,
since the IF condition is true if the exit code is higher or equal to the
ERRORLEVEL specified.
Example Batch File:
ECHO OFF
YET 12/25 Pause
IF ERRORLEVEL 2 GOTO NOTYET
IF ERRORLEVEL 1 GOTO ERROR
REM Pass-through Exit code was 0
ECHO MERRY CHRISTMAS!
GOTO END
:NOTYET
ECHO Still Waiting for Christmas . . .
GOTO END
:ERROR
ECHO YET did not understand the command line
PAUSE
:END
Generation and support of YET is made possible by user registration. If
you find that YET is valuable to you, register it by filling out the below
form and sending $5.00 to:
Computer Widow Software
P.O. Box 143
Cedar Brook NJ 08018
Name _________________________________
Address _________________________________
Type of Computer /_/ 8088/8086 /_/ 286 /_/ 386 /_/486
/_/ Other ____________________
DOS Version _________
Product YET 1.0